<%@page import="org.votes.bean.Details"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'votesResult.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<%
		List<Details> list = (List<Details>)request.getAttribute("list");
	 %>

  </head>
  
  <body>

  	一共有<b><%=list.size() %></b>条数据 </br>

	<table border="1">
	<tr>
		<td>问题</td>
 		<td>答案1的次数</td>
  		<td>答案2的次数</td>
  		<td>答案3的次数</td>
  		<td>答案4的次数</td>
	</tr>
  	<c:forEach var="detail" items="${list }">
  		<tr>
  		<td>${detail.title }</td>
 		<td>${detail.count1 } </td>
  		<td>${detail.count2 } </td>
  		<td>${detail.count3 } </td>
  		<td>${detail.count4 } </td>
  		</tr>
  	</c:forEach>
  	</table>  	
    
  </body>
</html>
